<?php
class Main extends  Controller
{
    function Main()
    {
        parent::Controller();
		header("Content-Type: text/html; charset=utf-8");
		$this->userdata = checksession($this->session,"systemdata");
    }
    function index()
    {
    	
    	
    	
		 $this->mytp->tp("main");
    }
    
    function top()
    {
    	  $this->mytp->assign("username",$this->userdata['username']);
		  $this->mytp->tp("top");
    }
    
    function left()
    {
    	  
    	  $this->mytp->assign("code",rand(10000,1000000000));
    	  $this->mytp->assign("username",$this->userdata['username']);
		  $this->mytp->tp("left");
    }
    function right()
    {
    	
    	
    	 $server = array(
    	 		'SERVER_SOFTWARE'=>$_SERVER['SERVER_SOFTWARE'],
    	 		'SERVER_TIME'=>date("Y年n月j日 H:i:s"),
    	 		'SERVER_BEIJING'=>gmdate("Y年n月j日 H:i:s",time()+8*3600),
    	 		'DISPLAY_ERROR'=>getcon("display_errors"),
    	 		'RUN_TIME'=>getcon("max_execution_time"),
    	 		"RUN_GPC"=>(1===get_magic_quotes_gpc())?'YES':'NO',
    	 		"LOGIN_USER"=>$this->session->userdata('username'),
    	 		"LOGIN_TIME"=>$this->session->userdata('lasttime'),
    	 		"LOGIN_IP"=>$this->session->userdata('lastip')
    	 );
    	 $this->mytp->assign("server",$server);
    	 $this->mytp->tp("index");
    }
    
}
?>